1. Field of the Invention
The present invention relates generally to computer programming languages and more specifically to a method implemented in the Java.TM. programming language on the Java.TM. platform for allowing applications to participate in the power management of a computer system.
2. Description of the Relevant Art
In recent years, as advances in technology have led to smaller and cheaper computing devices, mobile computing has become increasingly popular. The portability of mobile computing devices is an attractive feature for users who cannot be tied down to a traditional, stationary desktop computer. Nevertheless, it is the very portability of mobile computing devices which leads to one of their biggest drawbacks: dependence on a finite power source such as a battery. Consequently, hardware and software architectures to extend battery life and otherwise manage power resources are a critical feature in the design of mobile computing devices. Power management is an important issue not only for mobile computing devices, but also for computer-based devices of all sorts: desktop computers, laptop computers, palmtop computers, network computers, personal digital assistants, embedded devices, smart phones, and other computing devices which may exist now or which may be developed in the future.
Another recent trend in computing is the trend towards cross-platform computing for increased interoperability of different types of computer hardware and software. The computing world currently has many different operating systems and hardware architectures which combine to form many disparate platforms. Because of the differences in both system software and underlying hardware among different platforms, software compiled for one platform usually cannot function on another platform. Therefore, developers who desire to create software for multiple platforms must incur the expense of porting software to the additional platforms, and consumers must eventually shoulder these costs. Furthermore, it is inconvenient and inefficient to maintain and deliver multiple system-specific software packages. One popular cross-platform solution to these problems is the Java.TM. Platform, a software platform for delivering and running the same applications on a plurality of different operating systems and hardware platforms. What sets the Java.TM. Platform apart is that it sits on top of these other platforms, in a layer of software above the operating system and above the hardware.
The Java.TM. Platform has two basic parts: the Java.TM. Virtual Machine, and the Java.TM. Application Programming Interface (Java.TM. API). While each underlying platform has its own implementation of the Java.TM. Virtual Machine, there is only one Virtual Machine specification. Because of this, the Java.TM. Platform can provide a standard, uniform programming interface which allows Java.TM. applets and applications to run on any hardware. The Java.TM. Platform is therefore ideal for the Internet, where one program should be capable of running on any computer in the world. The Java.TM. Platform is designed to provide this "write once, run anywhere" capability.
Developers use the Java.TM. Language and Java.TM. APIs to write source code for Java.TM.-powered applications. A developer compiles the source code only once to the Java.TM. Platform, rather than to the machine language of an underlying system. Java.TM. programs compile to bytecodes which are machine instructions for the Java.TM. Virtual Machine. A program written in the Java.TM. Language compiles to a bytecode file which can run wherever the Java.TM. Platform is present, on any underlying operating system and on any hardware. In other words, the same exact Java.TM. application can run on any computing platform that is running the Java.TM. Platform.
Although the prior art has provided power management schemes, they are system-specific and thus inadequate for a cross-platform environment. The Microsoft OnNow power management initiative provides application programming interfaces (APIs) and specifies device-class-specific hardware requirements for power management. OnNow will allow an OnNow-compliant operating system running on OnNow-compliant hardware to determine power and configuration information about each OnNow-compliant device linked to the system. The OnNow-compliant operating system will control the power states for the OnNow-compliant devices and share this information with OnNow-compliant applications. However, the OnNow initiative is targeted only for Microsoft operating system environments such as Win32, Windows "Memphis," Windows NT version 5.0, and future versions thereof. Therefore, OnNow will not be implemented for other operating systems and for hardware platforms for which a Microsoft operating system is not available. As such, OnNow is a platform-specific solution that is not a "write once, run anywhere" method for applications which are intended to participate in power management. Furthermore, OnNow functions are performed at an operating system level and not at a higher level such as the Java.TM. Platform.
The Advanced Configuration and Power Interface (ACPI) is a power management specification developed by Intel, Microsoft, and Toshiba. ACPI is an interface specification, not a hardware or software specification, and it does not set forth APIs to be used by programmers. The ACPI interface gives an operating system direct control over the power management functions of a computer. For example, ACPI enables an ACPI-compliant operating system to control the amount of power given to ACPI-compliant devices attached to an ACPI-compliant computer. The ACPI specification comprises three run-time components: the ACPI Tables which describe the interfaces to the hardware, the ACPI Registers, and the ACPI BIOS which refers to the portion of the firmware that is ACPI-compliant. Nevertheless, there is no guarantee that ACPI will be implemented on computer systems built on anything other than Intel or compatible CPUs with Microsoft operating systems. As such, ACPI is not a "write once, run anywhere" solution for applications which are intended to participate in power management. Furthermore, ACPI functions are performed at an operating system level and not at a higher level such as the Java.TM. Platform.
Therefore, there is a need for a power management architecture that is a "write once, run anywhere" solution which operates on a plurality of hardware platforms and operating systems.